#!/bin/bash
OK=0
WARN=1
CRITICAL=2
UNKNOWN=3
PATH="/bin:/sbin:/usr/bin:/usr/sbin"

snmvalue=`snmpget -c public -v 2c localhost .1.3.6.1.4.1.96.255.1|awk '{print $4}'`
#echo "T$snmvalue"
if [ Tmp$snmvalue == Tmp ]
then
	echo "no snmp installed"
	exit $CRITICAL
elif (( $snmvalue <= 0 ))
then
        echo "critical the snmvalue is :$snmvalue"
        exit $CRITICAL
elif (( $snmvalue > 0 && $snmvalue <= 500 ))
then
        echo "OK the snmvalue is :$snmvalue"
        exit $OK
elif (( $snmvalue > 500 ))
then
	echo "Warning the snmvalue is :$snmvalue"
        exit $WARN
else
	echo "Unknown"
	exit $UNKNOWN
fi
